package com.liu.usky.rlzp.uskyrlzp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liu.usky.rlzp.uskyrlzp.entity.Equity;
import com.liu.usky.rlzp.uskyrlzp.entity.UserEquity;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户权益情况 Mapper 接口
 * </p>
 *
 * @author lcjzl
 * @since 2020-01-10
 */
@Mapper
public interface UserEquityMapper extends BaseMapper<UserEquity> {

	@Select("select e.* from equity e, user_equity ue where ue.userId = #{userId} and ue.equityId = e.id")
	List<Equity>  getUserEquity(@Param("userId") Integer userId);

}
